package com.example.controller;

import com.example.service.DataPipelineService;
import com.example.service.PhaserExampleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/phaser/example")
public class PhaserExampleController {

    @Autowired
    private PhaserExampleService phaserExampleService;
    @Autowired
    private DataPipelineService dataPipelineService;

    @GetMapping("/phaser-example")
    public String executeTasksWithPhaser() {
        phaserExampleService.executeTasksWithPhaser();
        return "Phaser 示例任务已启动";
    }

    @GetMapping("/data-pipeline")
    public String executeDataPipeline() {
        dataPipelineService.executeDataPipeline();
        return "Data Pipeline 任务已启动";
    }
}
